<template>
  <div>
    <div class="footer">
      <h1>我是footer子组件</h1>
      <button @click="$emit('alcohol', '一车茅台')">给爸爸送一车茅台</button>
    </div>
  </div>
</template>

<script>
export default {
  name: "",
  mounted() {
    this.$bus.$on("home", (params) => {
      console.log(params);
    });
  },
};
</script>

<style scoped>
.footer {
  width: 400px;
  height: 200px;
  background: red;
  margin: 50px 0px;
}
</style>